home *** CD-ROM | disk | FTP | other *** search
/ BUG 1 / BUGCD1996_0708.ISO / pc / util / minilin / minilin.exe / VAR / ADM / SETUP / SETUP_TI.{_6 < prev    next >
Text File  |  1994-05-07  |  5KB  |  106 lines

  1. #!/bin/sh
  2. if [ -r /tmp/SeTT_PX ]; then
  3.  T_PX="`cat /tmp/SeTT_PX`"
  4. elif [ ! "$1" = "" ]; then
  5.  T_PX=$1
  6. else
  7.  T_PX=/
  8. fi
  9. if [ "$COLOR" = "on" -o -r /tmp/SeTcolor ]; then # use color menus
  10.  dialog --title "TIMEZONE CONFIGURATION" --menu "Select one of the following timezones:" \
  11. 21 40 13 "Australia/LHI" "" "Australia/NSW" "" "Australi\
  12. a/North" ""  "Australia/Queensland" "" "Australia/S\
  13. outh" "" "Australia/Tasmania" ""  "Australia/Vict\
  14. oria" "" "Australia/West" "" "Australia/Yancowinna" "" "Brazi\
  15. l/Acre" "" "Brazil/DeNoronha" "" "Brazil/East" ""  "Brazil\
  16. /West" "" "Canada/Atlantic" ""  "Canada/Central" ""  "Canada/Ea\
  17. st-Saskatche" ""  "Canada/Eastern" ""  "Canada/Mountain" ""  "Canada/Ne\
  18. wfoundland" ""  "Canada/Pacific" ""  "Canada/Yukon" ""  "Chile/Co\
  19. ntinental" ""  "Chile/EasterIsland" "" "CET" ""  "Cuba" ""  "EET" ""  "Eg\
  20. ypt" ""  "Factory" "" "GB-Eire" ""  "GMT" "" "GMT+0" ""  "GMT+1" ""  "GM\
  21. T+10" ""  "GMT+11" ""  "GMT+12" ""  "GMT+13" ""  "GMT+2" ""  "GMT+3" ""   "G\
  22. MT+4" ""  "GMT+5" ""  "GMT+6" ""  "GMT+7" "" "GMT+8" ""  "GMT+9" ""  "GM\
  23. T-0" ""  "GMT-1" ""   "GMT-10" ""  "GMT-11" ""  "GMT-12" ""  "GMT-2" ""  "GM\
  24. T-3" ""  "GMT-4" ""  "GMT-5" ""  "GMT-6" ""  "GMT-7" "" "GMT-8" ""  "GM\
  25. T-9" ""  "GMT0" ""  "GMT1" ""  "GMT10" ""  "GMT11" ""  "GMT12" ""  "GM\
  26. T13" ""  "GMT2" ""  "GMT3" ""   "GMT4" ""  "GMT5" ""  "GMT6" "" "GM\
  27. T7" "" "GMT8" ""  "GMT9" ""  "Greenwich" ""   "Hongkong" ""  "Iceland" ""  "I\
  28. ran" "" "Israel" "" "Jamaica" "" "Japan" "" "Libya" "" "Mexico/BajaNorte" ""  "Me\
  29. xico/BajaSur" ""  "Mexico/General" ""  "MET" ""  "NZ" ""  "Na\
  30. vajo" ""  "PRC" ""  "Poland" ""  "ROC" ""  "ROK" "" "Singapore" ""  "Syst\
  31. emV/AST4" ""  "SystemV/AST4ADT" ""  "SystemV/CST6" ""  "SystemV/CST\
  32. 6CDT" ""  "SystemV/EST5" ""  "SystemV/EST5EDT" ""  "SystemV/HST10" "" "Syst\
  33. emV/MST7" ""  "SystemV/MST7MDT" ""  "SystemV/PST8" ""  "SystemV/PST\
  34. 8PDT" ""  "SystemV/YST9" ""  "SystemV/YST9YDT" "" "Turkey" "" "UCT" ""  "U\
  35. TC" ""  "Universal" "" "US/Alaska" ""  "US/Aleutian" ""  "US/\
  36. Arizona" "" "US/Central" ""  "US/East-Indiana" ""  "US/Eastern" ""  "US/H\
  37. awaii" ""  "US/Michigan" ""  "US/Mountain" ""  "US/Pacific" ""  "US/Pac\
  38. ific-New" ""  "US/Samoa" "" "W-SU" ""  "WET" ""  "Zulu" "" 2> /tmp/tz
  39.  if [ $? = 1 -o $? = 255 ]; then
  40.   rm -f /tmp/tz
  41.   exit
  42.  fi
  43.  TIMEZONE="`cat /tmp/tz`"
  44.  rm -f /tmp/tz
  45.  cd $T_PX/var/lib/zoneinfo
  46.  if [ -r $T_PX/usr/lib/zoneinfo/$TIMEZONE -o \
  47.       -r /var/adm/mount/usr/lib/zoneinfo/$TIMEZONE ]; then
  48.   ln -sf /usr/lib/zoneinfo/$TIMEZONE localtime
  49.  fi
  50. else # no color!
  51.  while [ 0 ]; do
  52.   echo -n "Would you like to configure your timezone ([y]es, [n]o)? "
  53.   read TIMECONF;
  54.   echo
  55.   if [ "$TIMECONF" = "n" ]; then
  56.    break;
  57.   fi
  58.   cat << EOF
  59. Select one of these timezones:
  60.  
  61. Australia/LHI Australia/NSW Australia/North Australia/Queensland
  62. Australia/South Australia/Tasmania Australia/Victoria Australia/West
  63. Australia/Yancowinna Brazil/Acre Brazil/DeNoronha Brazil/East Brazil/West
  64. Canada/Atlantic Canada/Central Canada/East-Saskatche Canada/Eastern 
  65. Canada/Mountain Canada/Newfoundland Canada/Pacific Canada/Yukon 
  66. Chile/Continental Chile/EasterIsland CET Cuba EET Egypt Factory GB-Eire GMT
  67. GMT+0 GMT+1 GMT+10 GMT+11 GMT+12 GMT+13 GMT+2 GMT+3 GMT+4 GMT+5 GMT+6 GMT+7
  68. GMT+8 GMT+9 GMT-0 GMT-1 GMT-10 GMT-11 GMT-12 GMT-2 GMT-3 GMT-4 GMT-5 GMT-6 GMT-7
  69. GMT-8 GMT-9 GMT0 GMT1 GMT10 GMT11 GMT12 GMT13 GMT2 GMT3 GMT4 GMT5 GMT6 GMT7
  70. GMT8 GMT9 Greenwich Hongkong Iceland Iran Israel Jamaica Japan Libya 
  71. Mexico/BajaNorte Mexico/BajaSur Mexico/General MET NZ Navajo PRC Poland ROC ROK
  72. Singapore SystemV/AST4 SystemV/AST4ADT SystemV/CST6 SystemV/CST6CDT 
  73. SystemV/EST5 SystemV/EST5EDT SystemV/HST10 SystemV/MST7 SystemV/MST7MDT 
  74. SystemV/PST8 SystemV/PST8PDT SystemV/YST9 SystemV/YST9YDT Turkey UCT UTC 
  75. Universal US/Alaska US/Aleutian US/Arizona US/Central US/East-Indiana 
  76. US/Eastern US/Hawaii US/Michigan US/Mountain US/Pacific US/Pacific-New US/Samoa
  77. W-SU WET Zulu
  78.  
  79. Type it at the prompt below exactly as it appears above.
  80.  
  81. EOF
  82.   echo -n "Timezone? "
  83.   read TIMEZONE;
  84.   echo
  85.   cd $T_PX/var/lib/zoneinfo
  86.   if [ -r $T_PX/usr/lib/zoneinfo/$TIMEZONE -o \
  87.        -r /var/adm/mount/usr/lib/zoneinfo/$TIMEZONE ]; then
  88.    echo "Creating link from $TIMEZONE to localtime in /var/lib/zoneinfo..."
  89.    echo
  90.    ln -sf /usr/lib/zoneinfo/$TIMEZONE localtime
  91.    break;
  92.   else
  93.    cat << EOF
  94.  
  95. Timezone $TIMEZONE could not be found. You may try again if you wish. 
  96. Make sure you type the name exactly as it appears - this configuration script
  97. is case sensitive.
  98.  
  99. Press [enter] to continue.
  100.  
  101. EOF
  102.    read JUNK;
  103.   fi
  104.  done
  105. fi
  106.